#!/usr/bin/env python
# -*- encoding: utf-8 -*-
# Created on 2018-09-04 14:42:13
# Project: taobao

#import urllib3.request
import urllib.request
resp = urllib.request.urlopen("http://www.baidu.com")
mybytes = resp.read()
mystr = mybytes.decode("utf8")
resp.close()

print(mystr)

#r = urllib3.request.RequestMethods.request("get", "http://www.baidu.com")
#print (r)